<?php
  // System Config
  #set_time_limit(8);
  error_reporting(E_ALL &~E_NOTICE);

  // Root Path
  define("APP_DIR", dirname(dirname(__FILE__)));

  // Module Path
  define("APP_MOD", APP_DIR."/modules/");
  define('APP_HOME',$_SERVER["DOCUMENT_ROOT"]);
  // Project URL
  $project = array_pop(explode(DIRECTORY_SEPARATOR,APP_DIR));
  define("projectName","");
  define("APP_URL", "http://".$_SERVER["HTTP_HOST"]);
  define("IMG_URL", "http://".$_SERVER["HTTP_HOST"]."/modules/systemapi/templates/default/images");
  define("IMG_PATH", APP_HOME."/modules/systemapi/templates/default/images");
  define("UPLOAD_URL", "http://".$_SERVER["HTTP_HOST"]."/upload");
  define("UPLOAD_PATH", APP_HOME."/upload");

  // Library
  define("URL_BASE","");
  $_SERVER["DOCUMENT_ROOT"] = "C:/AppServ/www";
  define("SYSTEM_PATH",$_SERVER["DOCUMENT_ROOT"]."/iLibrary");

  // JS LIBRALY OF Tinymce
  define("JSLIBRALY_URL","http://".$_SERVER["HTTP_HOST"]."/jsLibrary");
  define("JSLIBRALY_PATH",$_SERVER["DOCUMENT_ROOT"]."/jsLibrary");

  // Open Library
  define("LIBRARY_PATH",$_SERVER["DOCUMENT_ROOT"]."/openlib/");
  // Project library
  define("PROJECT_LIBRARY_PATH",APP_DIR."/library/");

  // Set Include Path
  set_include_path(get_include_path().PATH_SEPARATOR.LIBRARY_PATH.PATH_SEPARATOR.SYSTEM_PATH.PATH_SEPARATOR.PROJECT_LIBRARY_PATH);
  # PATH_SEPARATOR.APP_MOD
  //Database use in project
  define("COUNT_LIMIT_PERSON",1000);
  // The Setup Script
  require_once(APP_DIR."/setup/split_url.php");
  require_once(APP_DIR."/setup/join_url.php");
  require_once(APP_DIR."/setup/simple_html_dom.php");
  require_once(APP_DIR."/setup/url_to_absolute.php");
  require_once(APP_DIR."/setup/helper.inc.php");
  require_once(APP_DIR."/setup/openlibs.inc.php");
  require_once(APP_DIR."/setup/setup.php");
